package com.talentgame.tankspk.UIStage;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.scenes.scene2d.ui.ImageButton;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
import com.badlogic.gdx.utils.StringBuilder;
import com.talentgame.tankspk.GameCore.TanksGame;

/**
 * Created by 54560 on 2016/12/29.
 */
public class GameOverStage extends BaseStage{

    public int score;
    public Label scoreLabel;
    private Label textButton;
    public GameOverStage(AssetManager assets) {
        super(assets);
        BitmapFont font = new BitmapFont(true);
        Label.LabelStyle style = new Label.LabelStyle();
        style.font = font;
        StringBuilder stringBuilder = new StringBuilder("GameOver !!!!");
        Label gameOverLabel = new Label(" ",style);
        //gameOverLabel.setBounds(600,400,1,1);
        gameOverLabel.setPosition(600,700);
        gameOverLabel.setText(stringBuilder);
        gameOverLabel.setFontScale(10,-10);
        //gameOverLabel.setFontScaleY(-1);
        scoreLabel = new Label("Your Kill :   " + score + "  Tanks",style);
        //scoreLabel.setBounds(650,550,1,1);
        scoreLabel.setPosition(400,400);
        scoreLabel.setFontScale(10,-10);

        textButton = new Label("Press Sceen Back to Menu",style);
        textButton.setPosition(680,150);
        textButton.setFontScale(4,-4);
        addActor(textButton);
        addActor(scoreLabel);
        addActor(gameOverLabel);
    }

    @Override
    public boolean touchUp(int screenX, int screenY, int pointer, int button) {
        Gdx.app.log("touchup","TouchUp");
        TanksGame.instance.BackToMenu();
        return super.touchUp(screenX, screenY, pointer, button);
    }

    @Override
    public void act(float delta) {
        super.act(delta);
    }
}
